package com.yra.controller.mall;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Author: yrq
 * @Date: Create in 15:07 2019/11/27
 */
@Controller
@RequestMapping("/mall")
public class GoMallController {
    @RequestMapping(value = "{url}.html",method = RequestMethod.GET)
    public ModelAndView go(@PathVariable("url") String url){
        ModelAndView mv = new ModelAndView("/mall/"+url);
        return mv;
    }

    @RequestMapping(value = "login")
    public ModelAndView goToLoginPage(){
        return new ModelAndView("/mall/login");
    }


}
